//
//  AiTTSEngineDelegate.h
//  AiEngine2
//
//  Created by Midfar Sun on 12/27/12.
//  Copyright (c) 2012 Midfar Sun. All rights reserved.
//

#import <Foundation/Foundation.h>

@class AiTTSEngine;
@protocol AiTTSEngineDelegate <NSObject>

@required
/**
 *	@brief	引擎初始化是否成功
 *
 *	@param 	state      是否成功 (成功:OPT_SUCCESS 失败:OPT_FAILED)
 */
-(void)aiTTSEngine:(AiTTSEngine *)engine onInit:(NSNumber *)state ;

/**
 *	@brief	收到播放完成事件
 *
 *	@param 	engine 	合成引擎句柄
 */
-(void)aiTTSPlayerDidFinishPlaying:(AiTTSEngine *)engine;

/**
 *	@brief	引擎收到了合成结果
 *
 *	@param 	engine      引擎句柄
 *	@param 	recordId 	录音ID
 *	@param 	binaryData 	音频数据
 */
-(void)aiTTSEngine:(AiTTSEngine *)engine didReceive:(NSString *)recordId responseBinary:(NSData *)binaryData;


/**
 *	@brief	
 *
 *	@param 	engine      引擎对象
 *	@param 	recordId    
 *	@param 	jsonString 	响应JSON字符串
 */
-(void)aiTTSEngine:(AiTTSEngine *)engine didReceive:(NSString *)recordId responseJson:(NSString *)jsonString;


/**
 *	@brief	引擎收到了出错响应
 *
 *	@param 	engine      引擎对象
 *	@param 	recordId 	录音ID
 *	@param 	jsonString 	错误JSON字符串
 */
-(void)aiTTSEngine:(AiTTSEngine *)engine didReceive:(NSString *)recordId errorJson:(NSString *)jsonString;



@end

